<!--
 * @Author: zhangshifeng
 * @Date: 2022/1/11 17:04
 * @LastEditTime: 2022-01-18 00:07:19
 * @LastEditors: 马潭龙
 * @Description: 项目工具主页面
 * @FilePath: \devlomp\icm-vue-master\src\views\hifar\pm\HfPmProjectToolsMain.vue
-->
<template>
  <div class="h-custom-layout">
    <r-l-layout style="height: 100%" :leftMinWidth="250" class="h-custom-layout">
    <div slot="left" style="height: 100%">
      
      <HfPmProjectTools-left v-model="treecode" @getDataByKey="getDataByKey" @tree="getTree" ref="left" />
    </div>
    <div slot="right" style="height: 100%">
      <HfPmProjectTools-right v-model="treecode" :tree="treeData" ref="right" />
    </div>
  </r-l-layout>
  </div>
</template>

<script>
import HfPmProjectToolsLeft from '@views/hifar/pm/HfPmProjectToolsLeft'
import HfPmProjectToolsRight from '@views/hifar/pm/HfPmProjectToolsRight'
export default {
  name: 'HfPmProjectToolsMain',
  components: { HfPmProjectToolsRight, HfPmProjectToolsLeft },
  data() {
    return {
      description: '项目工具',
      treecode: '',
      selectedKey: [],
      treeData: [],
    }
  },
  methods: {
    getDataByKey(key) {
      this.selectedKey = key
      this.$refs.right.loadData(key)
    },
    //左树选中id置空
    claerSelect() {
      this.$refs.left.claerSelect()
    },
    // 树的数据
    getTree(treeData) {
      this.treeData = treeData
    },
  },
}
</script>

<style lang="less" scoped>
.h-custom-layout {
  height: 100%;
  .actions-icon {
    cursor: pointer;
  }
}
</style>